import request from '@/utils/request';

export function getSysAccountByUserId(userId) {
  return request({
    url: '/v1/users/' + userId + '/accounts',
    method: 'get'
  });
}

export function getAllByType() {
  return request({
    url: '/v1/sys/accounts/type',
    method: 'get'
  });
}

export function assignAccount(userId, accountIds) {
  return request({
    url: '/v1/users/' + userId + '/accounts',
    method: 'post',
    data: accountIds
  });
}
